package com.walsai.pcsys.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.walsai.pcsys.core.model.Contest;
import com.walsai.pcsys.core.service.ContestManager;


public class contestReportController extends AbstractController{
	
	private ContestManager contestManager;


	public void setContestManager(ContestManager contestManager){
		this.contestManager = contestManager;
	}
	
	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		Contest contest = this.contestManager.get(Long.valueOf(request.getParameter("contestId")));
		return new ModelAndView("contestReportView","contestModel",contest);
	}
	
	

}
